import 'package:flutter_house_manager/constants/index.dart';
import 'package:flutter_house_manager/utils/DioRequest.dart';

Future<dynamic> sendCodeAPI(params) =>
    dioRequest.get(HTTP_PATH.SEND_CODE, params: params);

// 登录
Future<dynamic> loginAPI(data) => dioRequest.post(HTTP_PATH.LOGIN, data: data);

// 获取用户信息
Future<dynamic> getUserInfoAPI() => dioRequest.get(HTTP_PATH.USER_INFO);

// 更新用户信息
Future<dynamic> updateUserInfoAPI(data) =>
    dioRequest.put(HTTP_PATH.USER_INFO, data: data);

// 上传图片
Future<dynamic> uploadPhotoAPI(data) =>
    dioRequest.upload(HTTP_PATH.UPLOAD, data: data);
